﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace LTQT.Models
{
    public class User
    {
        public int ID { get; set; }

        [Range(5, 15, ErrorMessage = "账号长度不符合要求:[5,15]")]
        [Required(ErrorMessage = "账号不可为空")]
        [DisplayName("账号")]
        public string Account { get; set; }

        [Range(5, 15, ErrorMessage = "密码长度不符合要求:[5,15]")]
        [Required(ErrorMessage = "密码不可为空")]
        [DisplayName("密码")]
        public string Password { get; set; }

        [Required(ErrorMessage = "手机号不可为空")]
        [DisplayName("手机号")]
        public string PhoneID { get; set; }

        [Required(ErrorMessage = "姓名不可为空")]
        [DisplayName("姓名")]
        public string Name { get; set; }

        [Range(10, 10, ErrorMessage = "学号长度不匹配")]
        [Required(ErrorMessage = "学号不可为空")]
        [DisplayName("学号")]
        public string Student_ID { get; set; }

        [Required(ErrorMessage = "微信号不可为空")]
        [DisplayName("微信号")]
        public string WeiXinID { get; set; }

        [DisplayName("是否为管理员")]
        public int IsAdmin { get; set; }


    }
}
